<div class="navbar navbar-static-top">
  <div class="navbar-inner">
    <div class="container">
      <button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <a class="brand" href="/">Home</a>

      <div class="nav-collapse">
        <ul class="nav pull-left">

          {% for key, value in menuList %}
          {% if value.roles is null %}
            <li class="active dropdown">
              <a href="#" class="dropdown-toggle">{{ value.name_mn }}</a>
              {% if value.child is null %}
              {% else %}
              <ul class="dropdown-menu">
                {% for chaildKey, childValue in value.child %}   
                  <li><a href="{{childValue.slug}}">{{ childValue.name_mn }}</a></li>
                {% endfor %}              
                </ul>
              {% endif %}
            </li>
          {% else %}           
            {% if is_granted("IS_AUTHENTICATED_REMEMBERED") %}
            {% if value.roles in userRoles %}
            <li class="active dropdown">
              <a href="{{value.slug}}" class="dropdown-toggle">{{ value.name_mn }}</a>
              {% if value.child is null %}
              {% else %}
              <ul class="dropdown-menu">
                {% for chaildKey, childValue in value.child %}   
                  <li><a href="{{childValue.slug}}">{{ childValue.name_mn }}</a></li>
                {% endfor %}              
                </ul>
              {% endif %}
            </li>
            {% endif %}
            {% else %}
            {% if value.roles == 'ANTI_LOGGED' %}
            <li class="active dropdown">
              <a href="{{value.slug}}" class="dropdown-toggle">{{ value.name_mn }}</a>
              {% if value.child is null %}
              {% else %}
              <ul class="dropdown-menu">
                {% for chaildKey, childValue in value.child %}   
                  <li><a href="{{childValue.slug}}">{{ childValue.name_mn }}</a></li>
                {% endfor %}              
                </ul>
              {% endif %}

              </li>
              {% endif %}
            {% endif %}
          {% endif %}
          {% endfor %}

              </ul>
            </div>
            <!-- / nav-collapse -->
            <ul class="menuIcon pull-right">
              {% if is_granted("IS_AUTHENTICATED_REMEMBERED") %}
                {% render 'PortalMainBundle:Menu:getNotifications' %}              
                <li class="entypo user" title="logout"><a href="{% if is_granted("IS_AUTHENTICATED_REMEMBERED") %}/logout{% else %}/user/login {% endif %}" class="topLoginButto" title="logout">L</a></li>
              {% else %}
                <li class="twitter"><a href="#">Twitter</a></li>
                <li class="facebook"><a href="#">Facebook</a></li>
                <li class="search"><a href="#">Search</a></li>
              {% endif %}
               
              
            </ul>
          </div>
        </div>
      </div>